package com.hmall.order.common;

public class UserContext {
    private static final ThreadLocal<Long> userThreadLocal = new ThreadLocal<Long>();
    public static void setUserId(Long userId){
        userThreadLocal.set(userId);
    }
    public static Long getUserId(){
        return userThreadLocal.get();
    }
    public static void removeUserId(){
        userThreadLocal.remove();
    }
}
